package com.nowar.common.exception;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * 对外异常
 *
 * @Author: 谢无殇。
 * @Date : 2023-01-15 22:05
 */
@Getter
@Setter
@Builder
public class CCException extends Exception {
    /**
     * 错误码
     */
    private int code;
    /**
     * 错误信息
     */
    private String message;

    public CCException() {
    }

    public CCException(int code) {
        this.code = code;
    }

    public CCException(String message) {
        super(message);
        this.message = message;
    }

    public CCException(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public CCException(String message, Throwable cause) {
        super(message, cause);
    }

    public CCException(Throwable cause) {
        super(cause);
    }

}
